package demo4;

/**
 * Created with IntelliJ IDEA.
 * Description: 继承型
 * User: 张宇田
 * Date: 2024-10-12
 * Time: 17:53
 */
public class Oc {
    public void test(){
        System.out.println("11111");
    }
}
class Test2{
    public  void fun(){
        new Oc(){
            public void test(){

                System.out.println("2222");
            }
        }.test();

    }
    public static void main(String[] args) {
        fun();
    }
}
